package org.ycx.doc.service;

import org.ycx.common.base.BaseService;
import org.ycx.doc.dao.enums.GroupUsersRole;
import org.ycx.doc.dao.model.DocGroup;
import org.ycx.doc.dao.model.DocGroupExample;
import org.ycx.doc.dao.model.DocProject;
import org.ycx.doc.dto.DocUser;

import java.util.List;

/**
 * DocGroupService接口
 * Created by yang on 2017-08-30 17:02:41.
 */
public interface IDocGroupService extends BaseService<DocGroup, DocGroupExample> {

    public List<DocGroup> findGroupByUser(Integer uid, GroupUsersRole roleType);

    List<DocProject> findGroupProjects(Integer gid);

    int createGroup(DocGroup bean);

    int delGroup(Integer id);

    int findGroupUserRole(int gid, int uid);

    List<DocUser> findGroupUser(Integer gid);

    DocUser addGroupUser(String user, Integer gid, Integer role);

    int findUser(String loginName);

    int removeGroupUser(Integer uid, Integer gid);

    DocUser findGroupUserById(Integer gid, Integer uid);
}